package com.qyl.deguru.dao.impl;

import org.apache.ibatis.session.SqlSession;

import com.qyl.deguru.dao.BaseDao;
import com.qyl.deguru.dao.CommentDao;
import com.qyl.deguru.dto.Comment;
import com.qyl.deguru.mapper.CommentMapper;

public class CommentDaoImple extends BaseDao implements CommentDao{

	@Override
	public int addComment(Comment comment) {
		SqlSession session=getSqlSession();
		CommentMapper commentMapper=session.getMapper(CommentMapper.class);
		int count=commentMapper.addComment(comment);
		session.commit();
		closeSqlSession();
		return count;
	}

}
